﻿using BW.MesProject.BasicData.Domain.基础;
using BW.MesProject.Public.ErrorCode;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BW.MesProject.BasicData.Infrastructure
{
    /// <summary>
    /// 物料组服务接口
    /// 定义物料组相关的业务操作
    /// </summary>
    public interface IMaterialgroupServices
    {
        /// <summary>
        /// 添加物料组
        /// </summary>
        /// <param name="model">物料组模型</param>
        /// <returns>添加结果</returns>
        ApiResult<int> AddMaterialgroup(Materialgroupmodel model);
        
        /// <summary>
        /// 删除物料组
        /// </summary>
        /// <param name="id">物料组ID</param>
        /// <returns>删除结果</returns>
        ApiResult<int> DeleteMaterialgroup(long id);
        
        /// <summary>
        /// 修改物料组信息
        /// </summary>
        /// <param name="model">物料组模型</param>
        /// <returns>修改结果</returns>
        ApiResult<int> UpdateMaterialgroup(Materialgroupmodel model);
        
        /// <summary>
        /// 根据ID获取物料组
        /// </summary>
        /// <param name="id">物料组ID</param>
        /// <returns>物料组信息</returns>
        ApiResult<Materialgroupmodel> GetMaterialgroupById(long id);
        
        /// <summary>
        /// 获取所有物料组
        /// </summary>
        /// <returns>物料组列表</returns>
        ApiResult<List<Materialgroupmodel>> GetAllMaterialgroup();
        
        /// <summary>
        /// 分页查询物料组
        /// </summary>
        /// <param name="Materialgroupcode">物料组编码（可选）</param>
        /// <param name="Materialgroupname">物料组名称（可选）</param>
        /// <param name="Materialgrouptype">物料组类型（可选）</param>
        /// <param name="pageindex">页码</param>
        /// <param name="pagesize">每页大小</param>
        /// <returns>分页结果</returns>
        ApiPaging<List<Materialgroupmodel>> GetMaterialgroup(string? Materialgroupcode, string? Materialgroupname,string? Materialgrouptype, int pageindex, int pagesize);
    }
}
